package com.ruoyi.verify.service.impl;

import com.ruoyi.common.core.text.Convert;
import com.ruoyi.verify.domain.VerifyMemberInfo;
import com.ruoyi.verify.domain.VerifyRequirement;
import com.ruoyi.verify.mapper.VerifyRequirementMapper;
import com.ruoyi.verify.service.IVerifyRequirementService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class VerifyRequirementServiceImpl implements IVerifyRequirementService
{
    @Autowired
    private VerifyRequirementMapper verifyRequirementMapper;

    /**
     * 查询【请填写功能名称】
     *
     * @param requirementid 【请填写功能名称】ID
     * @return 【请填写功能名称】
     */
    @Override
    public VerifyRequirement selectVerifyRequirementById(Long requirementid)
    {
        return verifyRequirementMapper.selectVerifyRequirementById(requirementid);
    }

    /**
     * 查询【请填写功能名称】列表
     *
     * @param verifyRequirement 【请填写功能名称】
     * @return 【请填写功能名称】
     */
    @Override
    public List<VerifyRequirement> selectVerifyRequirementList(VerifyRequirement verifyRequirement)
    {
        return verifyRequirementMapper.selectVerifyRequirementList(verifyRequirement);
    }

    /**
     * 新增【请填写功能名称】
     *
     * @param verifyRequirement 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int insertVerifyRequirement(VerifyRequirement verifyRequirement)
    {
        return verifyRequirementMapper.insertVerifyRequirement(verifyRequirement);
    }

    /**
     * 修改【请填写功能名称】
     *
     * @param verifyRequirement 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int updateVerifyRequirement(VerifyRequirement verifyRequirement)
    {
        return verifyRequirementMapper.updateVerifyRequirement(verifyRequirement);
    }

    /**
     * 删除【请填写功能名称】对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteVerifyRequirementByIds(String ids)
    {
        return verifyRequirementMapper.deleteVerifyRequirementByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除【请填写功能名称】信息
     *
     * @param requirementid 【请填写功能名称】ID
     * @return 结果
     */
    public int deleteVerifyRequirementById(Long requirementid)
    {
        return verifyRequirementMapper.deleteVerifyRequirementById(requirementid);
    }

    @Override
    public VerifyRequirement selectIfHaveTemplate(String verifytype, String factorycode) {
        return verifyRequirementMapper.selectIfHaveTemplate(verifytype,factorycode);
    }

    @Override
    public int updateVerifyRequirementStatus(Long sonplanid, Long status) {
        return verifyRequirementMapper.updateVerifyRequirementStatus(sonplanid,status);
    }
}
